package com.bigfish.crm.dao;

import java.util.List;

import com.bigfish.common.utils.PageItem;
import com.bigfish.crm.dto.Member;

public interface MemberDao {
		/*@Autowired
		private JdbcTemplate jdbcTemplate;

		public List<Member> getMemberList(PageItem page) {
			StringBuffer sb=new StringBuffer("select * from crm_member limit ?,?");
			List<Member> list=jdbcTemplate.query(sb.toString(),new Object[]{(page.getPageNo()-1)*page.getPageSize(),page.getPageSize()}, new RowMapper<Member>() {
				@Override
				public Member mapRow(ResultSet rs, int rowNum) throws SQLException {
					Member member=new Member();
					member.setId(rs.getInt("Id"));
					member.setUserId(rs.getString("user_id"));
					member.setAddress(rs.getString("address"));
					member.setAgeStr(rs.getString("age_str"));
					member.setBuyNum(rs.getInt("buy_num"));
					member.setBuySumMoney(rs.getDouble("buy_sum_money"));
					member.setCity(rs.getString("city"));
					member.setFollowNum(rs.getInt("follow_num"));
					member.setHealthHistory(rs.getString("health_history"));
					member.setLatestOrderTime(rs.getDate("latest_order_time"));
					member.setPhone(rs.getString("phone"));
					member.setProvince(rs.getString("province"));
					member.setSex(rs.getString("sex"));
					member.setSymptom(rs.getString("symptom"));
					member.setUserName(rs.getString("user_name"));
					return member;
				}
			});
			return list;
		}
		*/
	public List<Member> getMemberList(PageItem page);
}
